package com.apesource.project02.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.Date;

/**
 * @version 1.0
 * @auther:暮雪
 * @date:2025/9/18
 */
@TableName("results")
public class Result {
    @TableId(value = "result_id",type = IdType.AUTO)
    private int resultId;
    @TableField("user_id")
    private int userId;
    @TableField("event_id")
    private int eventId;
    @TableField("finish_time")
    private Date finishTime;
    @TableField("`rank`")
    private int rank;

    public Result() {
    }

    public Result(int userId, int eventId, Date finishTime, int rank) {
        this.userId = userId;
        this.eventId = eventId;
        this.finishTime = finishTime;
        this.rank = rank;
    }

    public Result(int resultId, int userId, int eventId, Date finishTime, int rank) {
        this.resultId = resultId;
        this.userId = userId;
        this.eventId = eventId;
        this.finishTime = finishTime;
        this.rank = rank;
    }

    public int getResultId() {
        return resultId;
    }

    public void setResultId(int resultId) {
        this.resultId = resultId;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public int getEventId() {
        return eventId;
    }

    public void setEventId(int eventId) {
        this.eventId = eventId;
    }

    public Date getFinishTime() {
        return finishTime;
    }

    public void setFinishTime(Date finishTime) {
        this.finishTime = finishTime;
    }

    public int getRank() {
        return rank;
    }

    public void setRank(int rank) {
        this.rank = rank;
    }
}
